package net.sunofbeach.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.sunofbeach.blog.pojo.Article;
import net.sunofbeach.blog.pojo.vo.ArticleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Bing
 * @since 2021-11-24
 */
public interface ArticleMapper extends BaseMapper<Article> {

    /**
     * 根据标签查询相关文章
     * @param targetLabel
     * @param articleId
     * @param size
     * @return
     */
    List<ArticleVo> listArticleByLikeLabel(@Param("targetLabel") String targetLabel,
                                           @Param("articleId") String articleId, @Param("size") int size);

    /**
     * 查询最新文章
     *
     * @param articleId
     * @param dxSize
     * @return
     */
    List<ArticleVo> listLastedArticleBySize(@Param("articleId") String articleId, @Param("dxSize") int dxSize);
}
